package com.meida.module.bus.provider.mapper;

import com.meida.module.bus.client.entity.BusMaterialPackage;
import com.meida.module.bus.client.entity.BusMaterialSrm;
import com.meida.common.mybatis.base.mapper.SuperMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 *  Mapper 接口
 * @author flyme
 * @date 2020-10-21
 */
@Mapper
public interface BusMaterialSrmMapper extends SuperMapper<BusMaterialSrm> {

    @Select(" select t1.*from(select t1.projectId,t1.majorCode,t1.packageNo from bus_material_package100 t1 " +
        " UNION select t1.projectId,t1.majorCode,t1.packageNo from bus_material_package100 t1) t1 " +
        " where t1.projectId = #{projectId}")
    List<BusMaterialPackage> getBusMaterialPackage(Long projectId);

}
